<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ include file="/commons/pages/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>mainFrame</title>
<link href="${ctx}/commons/styles/themes/blue/styles/style.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/commons/styles/themes/blue/styles/style.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/commons/scripts/jquery-ui/themes/redmond/jquery-ui.custom.css" rel="stylesheet" type="text/css" />
</head>
<body>
  <div align="center">
  <div align="left" style="width:99%">
    <div align="left" class="nav">${naviString}</div>
    <html-el:form action="/manager/UserInfo.do">
      <html-el:hidden property="method" value="saveModpopedom" />
      <html-el:hidden property="mod_id" />
      <html-el:hidden property="user_id" />
      <br />
      <table border="0" align="left" cellpadding="1" cellspacing="1" class="datagrid">
        <tr>
          <th width="5%">层级</th>
          <th width="35%">栏目名称</th>
          <th width="60%">权限设置</th>
        </tr>
        <c:forEach var="cur" items="${entityList}">
          <tbody>
            <c:if var="urlIsNull" test="${empty cur.mod_url}">
              <tr>
                <td align="center">${cur.map.level}</td>
                <td colspan="2" align="left"><c:forEach begin="1" end="${cur.map.level - 1}">&nbsp;&nbsp;&nbsp;&nbsp;</c:forEach>
                  <span style="color: blue;">${cur.mod_name}</span></td>
              </tr>
            </c:if>
            <c:if test="${!urlIsNull}">
              <tr>
                <td align="center">${cur.map.level}</td>
                <td align="left"><c:forEach begin="1" end="${cur.map.level - 1}">&nbsp;&nbsp;&nbsp;&nbsp;</c:forEach>
                  ${cur.mod_name}</td>
                <td align="left"><input type="checkbox" name="mod_id_" id="mod_id_${cur.mod_id}" value="${cur.mod_id}" />
                    <label for="mod_id_${cur.mod_id}">可以操作</label></td>
              </tr>
            </c:if>
          </tbody>
        </c:forEach>
        <tr>
          <td colspan="4"><span style="float:left;color:red;">注：蓝色为文件夹，黑色为可选文件</span><span style="margin-left: 200px;"><html-el:checkbox property="all" onclick="checkAll(this)"> 选择全部 </html-el:checkbox>
            <html-el:submit value=" 确定 " style=" margin:0px 5px 0px 15px;cursor:pointer;" styleClass="ui-state-default ui-corner-all" />
            <html-el:button property="back" value=" 返回 " onclick="history.back();" style=" margin:0px 5px 0px 5px;cursor:pointer;" styleClass="ui-state-default ui-corner-all" /></span></td>
        </tr>
      </table>
    </html-el:form>
  </div>
</div>
<script type="text/javascript" src="${ctx}/commons/scripts/jquery.js"></script>
<script type="text/javascript" src="${ctx}/commons/scripts/pager.js"></script>
<script type="text/javascript">//<![CDATA[
$(document).ready(function(){
	$("input[type='submit'],input[type='reset'],input[type='button']").css({border: "1px solid"});

		for(var i = 0;i < $("input[name='mod_id_']").length;i++){
			<c:forEach var="cur" items="${modPopedomList}">
				if("${cur.mod_id}" == $("input[name='mod_id_']").eq(i).val()){
					$("input[name='mod_id_']").eq(i).attr("checked",true);
				}
			</c:forEach>
		}
});

//]]></script>
</body>
</html>
